Skip to content

add request logs for iOS:APNS and Android:FCM#562

Closed
keremoge wants to merge 10 commits into
appleboy:masterfrom
keremoge:requestLog
Closed

add request logs for iOS:APNS and Android:FCM#562
keremoge wants to merge 10 commits into
appleboy:masterfrom
keremoge:requestLog

Conversation

@keremoge

Copy link
Copy Markdown
Contributor

Apns and FCM Api logs added to see which requests are going to Apns And Fcm servers

@keremoge

Copy link
Copy Markdown
Contributor Author

Can you check this PR? @appleboy

@keremoge

Copy link
Copy Markdown
Contributor Author

I fixed lint errors

@keremoge

keremoge commented Jul 5, 2021

Copy link
Copy Markdown
Contributor Author

Can you check this PR? @appleboy

@appleboy

notification.Payload = payload

return notification
jsonMarshall, err := json.Marshal(notification)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a flag to enable or disable showing the debug message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, I will check it out

@slimus

slimus commented Oct 26, 2021

Copy link
Copy Markdown
Contributor

Hi @keremoge! Could you explain please why we need to see apns\fcm message in logs? Is it still actual for you?

@keremoge

keremoge commented Oct 26, 2021

Copy link
Copy Markdown
Contributor Author

Hi @keremoge! Could you explain please why we need to see apns\fcm message in logs? Is it still actual for you?

Hi, because inn gorush you can track the log of gorush request but not the request going to Notification Servers.
If we can track these logs we can figure out if our notification request template is right.

  • request going gorush:
{
  "notifications": [
    {
      "platform": 1,
      "priority": "high",
      "tokens": [
        "**********4wAABp_BOYhKWWMLfSF9GV52UO_rYvBoKbQuuuI6HWSfLdG7_t-ZhA2_Zg47BpQbzBegmHUxovPTp3rU0xajPAfnz9IkOb**********"
      ],
      "content_available": true,
      "category": "CONFIRM",
      "sound": {
        "critical": 1,
        "name": "default",
        "volume": 1
      },
      "alert": {
        "body": "iOS UAT başarılı bildirim geldi"
      },
      "data": {
        "customerNo": 12345,
        "languageCode": "tr",
        "specificCharText": "denemee"
      }
    }
  ]
}
  • request going APNS: (We need this)
{
  "aps": {
    "alert": {
      "body": "iOS UAT başarılı bildirim geldi"
    },
    "category": "CONFIRM",
    "content-available": 1,
    "sound": {
      "critical": 1,
      "name": "default",
      "volume": 1
    }
  },
  "customerNo": 12345,
  "languageCode": "tr",
  "specificCharText": "denemee"
}

@slimus

slimus commented Oct 27, 2021

Copy link
Copy Markdown
Contributor

@keremoge makes sense! Thank you. Can you please update your PR? Now we have conflicts here

@keremoge

Copy link
Copy Markdown
Contributor Author

@keremoge makes sense! Thank you. Can you please update your PR? Now we have conflicts here

I resolved conflicts on vsCode but still has conflict warnings

@keremoge

Copy link
Copy Markdown
Contributor Author

Should I need to make new PR?

@slimus

slimus commented Oct 28, 2021

Copy link
Copy Markdown
Contributor

@keremoge I think so. Please close this PR and create a new one. Thank you!

@keremoge keremoge closed this Oct 29, 2021
@keremoge

Copy link
Copy Markdown
Contributor Author

reopened this PR as #639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants